﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JVP.Middleware;

namespace JVP.Infrastructure
{
    public static class ObjectManager
    {
        public static T GetObject<T>()
        {
            object instance = default(T);
            if (typeof(T) == typeof(IUserManager))
                instance = new UserManager();
            else if (typeof(T) == typeof(IDBManager))
                instance = new DBManager();
            else if (typeof(T) == typeof(IOfficeManager))
                instance = new OfficeManager();
            else
                instance = new EmployeeManager();
            return (T)instance;
        }
    }
}
